<?php
class ArrayAndObjectParser{
  static public function ArrayValueWithJointKey($key, array $arr){
    $val = array();
    array_walk_recursive($arr, function($v, $k) use($key, &$val){
        if($k == $key) array_push($val, $v);
    });
    return count($val) > 1 ? $val : array_pop($val);
  }
  static public function ObjectPropiertiesWithJointName($propName, array $objArr)
  {
    $val = array();
    $getter = 'get_' . $propName;
    foreach ($objArr as $o) {
      $val[]= $o->$getter();
    }
    return $val;
  }
}
?>